|
Forms: Factories filtering
How it works
- The goal is to enable the user to choose which factories to use (especially in kfd). It will also provide the ability to group widgets by type in toolbars and menus, and toolbars will be genrated automatically.
- A std file to define all basic groups and roles
<Group name="std">
<WidgetRole>LineEdit<WidgetRole/>
- A xml file to define widget groups, etc for each factory. Maybe it could also define all widget properties (icon, description, etc)
<Group name="containers">
<Text="Simple Containers">
<Description="">
<Icon="container">
<Widget role="LineEdit>QLinEdit<Widget/>
<Group name =""> ...
<Group/>
- Factories will be loaded by order of priority. When new factory is loaded, for each widget:
- If 'Override similar widget' option is on (auto in kexi), the widget checks if there's already a widget with the same role. If so, widet class names (and alternates) are just added as alternate for the widget class already in the list.
- Else, the widget is loaded (ie a WidgetInfo is created and filled)
- When all factory are loaded, the library creates the xml file for the gui, with one toolbar and one submenu for each group.
Chosing factories in the GUI
- There will be a dialog in KFD to choose factories to load. It will be a list of all factories available, that can be checked, with the ability to show details (name, description, widget included...) about the selected factory (below the list or with extra small dialog). This informations will be taken the factory xml file.
|